
import json, os, argparse
from src.planner import run_batch

def main():
    parser = argparse.ArgumentParser()
    parser.add_argument("--inputs", default="inputs")
    parser.add_argument("--data", default="data/cities")
    parser.add_argument("--outputs", default="outputs")
    args = parser.parse_args()

    files = [os.path.join(args.inputs, f) for f in os.listdir(args.inputs) if f.endswith(".json")]
    configs = []
    for fp in files:
        with open(fp, encoding="utf-8") as f:
            configs.append(json.load(f))
    run_batch(configs, args.data, args.outputs)
    print(f"Generated {len(files)} plans into {args.outputs}")

if __name__ == "__main__":
    main()
